/**      
 * @file		switch2.cpp
 * @description		Demonstrates a switch statement. Notice this 
 *			version is missing the break statements, so 
 *			execution falls through until it reaches the end
 *			of the switch or it encounters a break statement.
 *			This is a reminder to check you've added the break
 *			statement.
 * @course		CSCI 123 Section 00000
 * @assignment		Sample 6
 * @date		mm/dd/yyyy
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <iostream>
using namespace std;

/**
 * @return zero if the application executes successfully
 */
int main() {
	char drink = ' ';
	double price = 0.0;

	while(drink != 'q') {
		cout << "Welcome to Starbucks automated coffee system\n";
		cout << "To order a drink, please type your ";
		cout << "selection from the menu\n";
		cout << "'a' for a Cafe Mocha\n";
		cout << "'b' for a Cafe Latte\n";
		cout << "'c' for a Mocha Frappuccino\n";
		cout << "'d' for a Java Chip Frappuccino\n";
		cout << "'q' to quit\n";
		cin >> drink;
		switch(drink) {
			case 'a':
				price += 3.50;
			case 'b':
				price += 3.00;
			case 'c':
				price += 4.90;
			case 'd':
				price += 4.75;
			default :
				drink = 'q';
		}
	}
	cout.setf(ios::fixed);
	cout.setf(ios::showpoint);
	cout.precision(2);
	cout << "Your total cost is $" << price << endl;
	return 0;
}
